﻿<%@ Page Title="Search" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Search.aspx.cs" Inherits="APH.Parl2.SearchWebApp.Pages.Search" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Search
    </h2>
    <p>
        Search documents by document title:</p>
    <p>
        &nbsp;<asp:TextBox ID="TextBox1" runat="server" Width="400px"></asp:TextBox>
    </p>
    <p>
        <asp:Button ID="Button1" runat="server" Text="Search" />
    </p>
    <p>
        <asp:GridView ID="GridView1" runat="server" Width="100%" AutoGenerateColumns="False"
            DataSourceID="ObjectDataSource1">
            <Columns>
                <asp:HyperLinkField DataTextField="Title" HeaderText="Title" SortExpression="Id"
                    DataNavigateUrlFields="Id" DataNavigateUrlFormatString="Details.aspx?Id={0}"
                    ItemStyle-Width="150" />
                <asp:BoundField DataField="Author" HeaderText="Author" SortExpression="Author" ItemStyle-Width="100" />
                <asp:BoundField DataField="CreatedDate" HeaderText="Created Date" SortExpression="CreatedDate"
                    ItemStyle-Width="50" />
                <asp:BoundField DataField="UpdatedDate" HeaderText="Updated Date" SortExpression="UpdatedDate"
                    ItemStyle-Width="50" />
            </Columns>
        </asp:GridView>
    </p>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="FindDocumentByTitle"
        
        TypeName="APH.Parl2.SearchWebApp.SearchManagerServiceReference.SearchManagerClient">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBox1" Name="title" PropertyName="Text" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
